import { defineStore } from 'pinia';
import { Card } from './types';

type ProgramData = {
  list: Card[];
  config: {
    fileName: string;
    passwordType: 'normal' | 'special';
    exportType: 'text' | 'json';
    passwordLength: number;
  };
};
const programStore = defineStore('program', {
  state: (): ProgramData => ({
    list: [],
    config: {
      fileName: 'config',
      passwordType: 'normal',
      exportType: 'json',
      passwordLength: 8,
    },
  }),
  persist: true,
});

export default programStore;
